package com.ailesson.video.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ailesson.common.reply.PageResult;
import com.ailesson.video.entity.VideoEntity;
import com.ailesson.video.model.req.VideoQueryReq;
import com.ailesson.video.model.req.VideoReq;
import com.ailesson.video.model.reply.VideoReply;

import java.util.Map;

/**
 * 课程视频
 *
 * @author mac
 * @email mac@gmail.com
 * @date 2024-10-02 10:31:00
 */
public interface VideoService extends IService<VideoEntity> {

    /**
     * 分页查询
     * @param params
     * @return
     */
    PageResult queryPage(VideoQueryReq params);

    /**
     * 查询信息
     * @param id
     * @return
     */
    VideoReply info(Long id);

    /**
     * 更新信息
     * @param video
     */
    void update(VideoReq video);

    /**
     * 新增
     * @param video
     */
    Long add(VideoReq video);

    void deleteByCourseId(Long id);

    Map<String, Object> getPlayAuth(Long courseId, Long videoId);
}

